# -*- coding: utf-8 -*-
# https://blog.csdn.net/weixin_52040868
# 公众号：测个der
# 微信：qing_an_an


import sys
from PyQt5.QtWidgets import *
from PyQt5.Qt import *

class Litter(QWidget):
    def __init__(self):
        super(Litter, self).__init__()
        self.initUI()

    def initUI(self):
        box = QHBoxLayout(self)
        self.setWindowTitle("例子")
        self.setGeometry(300,300,300,200)
        topleft = QFrame()
        topleft.setFrameShape(QFrame.StyledPanel)
        bottom = QFrame()
        bottom.setFrameShape(QFrame.StyledPanel)
        # 水平
        splotter1 = QSplitter(Qt.Horizontal)
        textEdit = QTextEdit()

        splotter1.addWidget(topleft)
        splotter1.addWidget(textEdit)
        # 垂直方向
        splotter2 = QSplitter(Qt.Vertical)
        splotter2.addWidget(splotter1)
        splotter2.addWidget(bottom)

        box.addWidget(splotter2)
        self.setLayout(box)

if __name__ == '__main__':
    app = QApplication(sys.argv)
    demo = Litter()
    demo.show()
    sys.exit(app.exec_())